feat(inbox): show relative timestamp on signal cards#2240
Merged
Conversation
Adds a reusable RelativeTimestamp component (relative "n ago" text with the exact locale datetime in a hover tooltip) and renders it in the signal card header so every signal in the report detail view shows when it was created. Generated-By: PostHog Code Task-Id: 7f669e63-b71c-4b2d-b7ba-c6178112ad57
Contributor
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
apps/code/src/renderer/components/ui/RelativeTimestamp.tsx:28
Trailing space in className when `className` prop is omitted. The template `"... ${className ?? ""}"` produces a trailing space when no className is provided. This is a minor spacing issue per the project's template string conventions. Using a conditional insertion is cleaner.
```suggestion
className={`shrink-0 text-(--gray-10) text-[11px]${className ? ` ${className}` : ""}`}
```
### Issue 2 of 2
apps/code/src/renderer/components/ui/RelativeTimestamp.tsx:30
**Stale relative time display**
`formatRelativeTimeLong` is called once at render time and computes `Date.now() - date.getTime()`, but the component has no mechanism to re-run as wall-clock time advances. A user who leaves the inbox view open will see the label freeze (e.g. "1 minute ago" stays forever). Consider driving a periodic re-render with a `useState` + `useEffect`/`setInterval` that ticks every minute, or using a shared time-tick context.
Reviews (1): Last reviewed commit: "feat(inbox): show relative timestamp on ..." | Re-trigger Greptile |
joshsny
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RelativeTimestampcomponent incomponents/ui/that renders relative time (e.g. "1 hour ago") with the exact locale datetime in a hover tooltip.SignalCardHeaderso every signal in the inbox report detail view shows itstimestampat the top right of the card, alongside the existing Verified badge.GenericSignalCard.Test plan
Created with PostHog Code